import Fluent

struct CreateEmployee: Migration {
    
    func prepare(on database: Database) -> EventLoopFuture<Void> {
        database.schema("employee")
            .id()
            .field("abbreviation", .string)
            .field("firstName", .string)
            .field("lastName", .string)
            .field("jobTitle", .string)
            .field("jobDescription", .string)
            .field("email", .string)
            .field("telephoneNumber", .string)
            .field("mobileNumber", .string)
            .field("skypeNumber", .string)
            .field("isMale", .bool)
            .create()
    }
    
    func revert(on database: Database) -> EventLoopFuture<Void> {
        database.schema("employee").delete()
    }
}
